#include <iostream>
#include <cstdlib>
#include <climits>
#include "DRAN.h"
using namespace std;

#define SIM_END 2000000 // 1000 seconds
#define NEW_USER_RATE 2000 // one new user every second

extern TIME now, end;
extern int VoIP_count, Video_count;


int main() {
  now = 0;
  end = SIM_END;
  // Initialize RRH and associated BS
  RRH rrh;
  rrh.Init();

  /***** Main Loop *****/
  while (now < end ) {
    // uplink schedule
    // downlink schedule
    // advance time
    now++;

    // randomly generate users
    if (rand()%NEW_USER_RATE <= 0) {
      rrh.UserGen();
    }

    // generate traffic
    rrh.RequestGen();

  }
  cout<<rrh.bearers.size()<<endl;
  cout<<VoIP_count<<endl;
  cout<<Video_count<<endl;
}
